Integrand size = 21, antiderivative size = 116 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {\cot (c+d x)}{a^4 d}-\frac {4 b \log (\tan (c+d x))}{a^5 d}+\frac {4 b \log (a+b \tan (c+d x))}{a^5 d}-\frac {b}{3 a^2 d (a+b \tan (c+d x))^3}-\frac {b}{a^3 d (a+b \tan (c+d x))^2}-\frac {3 b}{a^4 d (a+b \tan (c+d x))} \]
-cot(d*x+c)/a^4/d-4*b*ln(tan(d*x+c))/a^5/d+4*b*ln(a+b*tan(d*x+c))/a^5/d-1/ 3*b/a^2/d/(a+b*tan(d*x+c))^3-b/a^3/d/(a+b*tan(d*x+c))^2-3*b/a^4/d/(a+b*tan (d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(259\) vs. \(2(116)=232\).
Time = 3.28 (sec) , antiderivative size = 259, normalized size of antiderivative = 2.23 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\frac {\sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \left (-3 a (b+a \cot (c+d x))^3 \sin ^2(c+d x)+\frac {a^2 b^4 \tan (c+d x)}{a^2+b^2}+\frac {b^2 \left (18 a^4+23 a^2 b^2+9 b^4\right ) (a \cos (c+d x)+b \sin (c+d x))^2 \tan (c+d x)}{\left (a^2+b^2\right )^2}-\frac {2 a^2 b^3 \left (3 a^2+2 b^2\right ) (a+b \tan (c+d x))}{\left (a^2+b^2\right )^2}-12 b \cos ^2(c+d x) \log (\sin (c+d x)) (a+b \tan (c+d x))^3+12 b \cos ^2(c+d x) \log (a \cos (c+d x)+b \sin (c+d x)) (a+b \tan (c+d x))^3\right )}{3 a^5 d (a+b \tan (c+d x))^4} \]
(Sec[c + d*x]^3*(a*Cos[c + d*x] + b*Sin[c + d*x])*(-3*a*(b + a*Cot[c + d*x ])^3*Sin[c + d*x]^2 + (a^2*b^4*Tan[c + d*x])/(a^2 + b^2) + (b^2*(18*a^4 + 23*a^2*b^2 + 9*b^4)*(a*Cos[c + d*x] + b*Sin[c + d*x])^2*Tan[c + d*x])/(a^2 + b^2)^2 - (2*a^2*b^3*(3*a^2 + 2*b^2)*(a + b*Tan[c + d*x]))/(a^2 + b^2)^2 - 12*b*Cos[c + d*x]^2*Log[Sin[c + d*x]]*(a + b*Tan[c + d*x])^3 + 12*b*Cos [c + d*x]^2*Log[a*Cos[c + d*x] + b*Sin[c + d*x]]*(a + b*Tan[c + d*x])^3))/ (3*a^5*d*(a + b*Tan[c + d*x])^4)
Time = 0.29 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3999, 54, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (c+d x)^2 (a+b \tan (c+d x))^4}dx\) |
\(\Big \downarrow \) 3999 |
\(\displaystyle \frac {b \int \frac {\cot ^2(c+d x)}{b^2 (a+b \tan (c+d x))^4}d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 54 |
\(\displaystyle \frac {b \int \left (\frac {\cot ^2(c+d x)}{a^4 b^2}-\frac {4 \cot (c+d x)}{a^5 b}+\frac {4}{a^5 (a+b \tan (c+d x))}+\frac {3}{a^4 (a+b \tan (c+d x))^2}+\frac {2}{a^3 (a+b \tan (c+d x))^3}+\frac {1}{a^2 (a+b \tan (c+d x))^4}\right )d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b \left (-\frac {4 \log (b \tan (c+d x))}{a^5}+\frac {4 \log (a+b \tan (c+d x))}{a^5}-\frac {3}{a^4 (a+b \tan (c+d x))}-\frac {\cot (c+d x)}{a^4 b}-\frac {1}{a^3 (a+b \tan (c+d x))^2}-\frac {1}{3 a^2 (a+b \tan (c+d x))^3}\right )}{d}\) |
(b*(-(Cot[c + d*x]/(a^4*b)) - (4*Log[b*Tan[c + d*x]])/a^5 + (4*Log[a + b*T an[c + d*x]])/a^5 - 1/(3*a^2*(a + b*Tan[c + d*x])^3) - 1/(a^3*(a + b*Tan[c + d*x])^2) - 3/(a^4*(a + b*Tan[c + d*x]))))/d
3.1.75.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[m, 0] && IntegerQ[n] && !(IGtQ[n, 0] && LtQ[m + n + 2, 0])
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[b/f Subst[Int[x^m*((a + x)^n/(b^2 + x^2)^(m/2 + 1)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/2]
Time = 2.24 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.89
method | result | size |
derivativedivides | \(\frac {-\frac {1}{a^{4} \tan \left (d x +c \right )}-\frac {4 b \ln \left (\tan \left (d x +c \right )\right )}{a^{5}}-\frac {b}{3 a^{2} \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {4 b \ln \left (a +b \tan \left (d x +c \right )\right )}{a^{5}}-\frac {3 b}{a^{4} \left (a +b \tan \left (d x +c \right )\right )}-\frac {b}{a^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}}{d}\) | \(103\) |
default | \(\frac {-\frac {1}{a^{4} \tan \left (d x +c \right )}-\frac {4 b \ln \left (\tan \left (d x +c \right )\right )}{a^{5}}-\frac {b}{3 a^{2} \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {4 b \ln \left (a +b \tan \left (d x +c \right )\right )}{a^{5}}-\frac {3 b}{a^{4} \left (a +b \tan \left (d x +c \right )\right )}-\frac {b}{a^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}}{d}\) | \(103\) |
risch | \(-\frac {2 i \left (96 i a^{3} b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+36 i a^{5} b \,{\mathrm e}^{4 i \left (d x +c \right )}-120 i a \,b^{5} {\mathrm e}^{4 i \left (d x +c \right )}-3 a^{6} {\mathrm e}^{6 i \left (d x +c \right )}+63 a^{4} b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-120 a^{2} b^{4} {\mathrm e}^{6 i \left (d x +c \right )}+12 b^{6} {\mathrm e}^{6 i \left (d x +c \right )}+18 i a^{5} b \,{\mathrm e}^{6 i \left (d x +c \right )}+18 i a^{5} b \,{\mathrm e}^{2 i \left (d x +c \right )}-9 a^{6} {\mathrm e}^{4 i \left (d x +c \right )}+63 a^{4} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+120 a^{2} b^{4} {\mathrm e}^{4 i \left (d x +c \right )}-36 b^{6} {\mathrm e}^{4 i \left (d x +c \right )}+60 i a \,b^{5} {\mathrm e}^{2 i \left (d x +c \right )}+60 i a \,b^{5} {\mathrm e}^{6 i \left (d x +c \right )}-120 i a^{3} b^{3} {\mathrm e}^{6 i \left (d x +c \right )}-9 a^{6} {\mathrm e}^{2 i \left (d x +c \right )}-27 a^{4} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+32 a^{2} b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+36 b^{6} {\mathrm e}^{2 i \left (d x +c \right )}-3 a^{6}-27 a^{4} b^{2}-32 a^{2} b^{4}-12 b^{6}\right )}{3 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b +i a \right )^{3} \left (i a +b \right )^{3} a^{4} d}-\frac {4 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{5} d}+\frac {4 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{a^{5} d}\) | \(470\) |
1/d*(-1/a^4/tan(d*x+c)-4/a^5*b*ln(tan(d*x+c))-1/3/a^2*b/(a+b*tan(d*x+c))^3 +4/a^5*b*ln(a+b*tan(d*x+c))-3/a^4*b/(a+b*tan(d*x+c))-1/a^3*b/(a+b*tan(d*x+ c))^2)
Leaf count of result is larger than twice the leaf count of optimal. 874 vs. \(2 (114) = 228\).
Time = 0.30 (sec) , antiderivative size = 874, normalized size of antiderivative = 7.53 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {13 \, a^{6} b^{4} + 15 \, a^{4} b^{6} + 6 \, a^{2} b^{8} - {\left (3 \, a^{10} + 18 \, a^{8} b^{2} - 49 \, a^{6} b^{4} - 84 \, a^{4} b^{6} - 36 \, a^{2} b^{8}\right )} \cos \left (d x + c\right )^{4} + {\left (9 \, a^{8} b^{2} - 71 \, a^{6} b^{4} - 102 \, a^{4} b^{6} - 42 \, a^{2} b^{8}\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left (a^{6} b^{4} + 3 \, a^{4} b^{6} + 3 \, a^{2} b^{8} + b^{10} - {\left (3 \, a^{8} b^{2} + 8 \, a^{6} b^{4} + 6 \, a^{4} b^{6} - b^{10}\right )} \cos \left (d x + c\right )^{4} + {\left (3 \, a^{8} b^{2} + 7 \, a^{6} b^{4} + 3 \, a^{4} b^{6} - 3 \, a^{2} b^{8} - 2 \, b^{10}\right )} \cos \left (d x + c\right )^{2} + {\left ({\left (a^{9} b - 6 \, a^{5} b^{5} - 8 \, a^{3} b^{7} - 3 \, a b^{9}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (a^{7} b^{3} + 3 \, a^{5} b^{5} + 3 \, a^{3} b^{7} + a b^{9}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \, {\left (a^{6} b^{4} + 3 \, a^{4} b^{6} + 3 \, a^{2} b^{8} + b^{10} - {\left (3 \, a^{8} b^{2} + 8 \, a^{6} b^{4} + 6 \, a^{4} b^{6} - b^{10}\right )} \cos \left (d x + c\right )^{4} + {\left (3 \, a^{8} b^{2} + 7 \, a^{6} b^{4} + 3 \, a^{4} b^{6} - 3 \, a^{2} b^{8} - 2 \, b^{10}\right )} \cos \left (d x + c\right )^{2} + {\left ({\left (a^{9} b - 6 \, a^{5} b^{5} - 8 \, a^{3} b^{7} - 3 \, a b^{9}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (a^{7} b^{3} + 3 \, a^{5} b^{5} + 3 \, a^{3} b^{7} + a b^{9}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )} \log \left (-\frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4}\right ) - {\left ({\left (9 \, a^{9} b + 78 \, a^{7} b^{3} + 69 \, a^{5} b^{5} + 4 \, a^{3} b^{7} - 12 \, a b^{9}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (9 \, a^{7} b^{3} + 3 \, a^{5} b^{5} - 6 \, a^{3} b^{7} - 4 \, a b^{9}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{3 \, {\left ({\left (3 \, a^{13} b + 8 \, a^{11} b^{3} + 6 \, a^{9} b^{5} - a^{5} b^{9}\right )} d \cos \left (d x + c\right )^{4} - {\left (3 \, a^{13} b + 7 \, a^{11} b^{3} + 3 \, a^{9} b^{5} - 3 \, a^{7} b^{7} - 2 \, a^{5} b^{9}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{11} b^{3} + 3 \, a^{9} b^{5} + 3 \, a^{7} b^{7} + a^{5} b^{9}\right )} d - {\left ({\left (a^{14} - 6 \, a^{10} b^{4} - 8 \, a^{8} b^{6} - 3 \, a^{6} b^{8}\right )} d \cos \left (d x + c\right )^{3} + 3 \, {\left (a^{12} b^{2} + 3 \, a^{10} b^{4} + 3 \, a^{8} b^{6} + a^{6} b^{8}\right )} d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )}} \]
-1/3*(13*a^6*b^4 + 15*a^4*b^6 + 6*a^2*b^8 - (3*a^10 + 18*a^8*b^2 - 49*a^6* b^4 - 84*a^4*b^6 - 36*a^2*b^8)*cos(d*x + c)^4 + (9*a^8*b^2 - 71*a^6*b^4 - 102*a^4*b^6 - 42*a^2*b^8)*cos(d*x + c)^2 + 6*(a^6*b^4 + 3*a^4*b^6 + 3*a^2* b^8 + b^10 - (3*a^8*b^2 + 8*a^6*b^4 + 6*a^4*b^6 - b^10)*cos(d*x + c)^4 + ( 3*a^8*b^2 + 7*a^6*b^4 + 3*a^4*b^6 - 3*a^2*b^8 - 2*b^10)*cos(d*x + c)^2 + ( (a^9*b - 6*a^5*b^5 - 8*a^3*b^7 - 3*a*b^9)*cos(d*x + c)^3 + 3*(a^7*b^3 + 3* a^5*b^5 + 3*a^3*b^7 + a*b^9)*cos(d*x + c))*sin(d*x + c))*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2) - 6*(a^6*b^4 + 3*a^ 4*b^6 + 3*a^2*b^8 + b^10 - (3*a^8*b^2 + 8*a^6*b^4 + 6*a^4*b^6 - b^10)*cos( d*x + c)^4 + (3*a^8*b^2 + 7*a^6*b^4 + 3*a^4*b^6 - 3*a^2*b^8 - 2*b^10)*cos( d*x + c)^2 + ((a^9*b - 6*a^5*b^5 - 8*a^3*b^7 - 3*a*b^9)*cos(d*x + c)^3 + 3 *(a^7*b^3 + 3*a^5*b^5 + 3*a^3*b^7 + a*b^9)*cos(d*x + c))*sin(d*x + c))*log (-1/4*cos(d*x + c)^2 + 1/4) - ((9*a^9*b + 78*a^7*b^3 + 69*a^5*b^5 + 4*a^3* b^7 - 12*a*b^9)*cos(d*x + c)^3 - 3*(9*a^7*b^3 + 3*a^5*b^5 - 6*a^3*b^7 - 4* a*b^9)*cos(d*x + c))*sin(d*x + c))/((3*a^13*b + 8*a^11*b^3 + 6*a^9*b^5 - a ^5*b^9)*d*cos(d*x + c)^4 - (3*a^13*b + 7*a^11*b^3 + 3*a^9*b^5 - 3*a^7*b^7 - 2*a^5*b^9)*d*cos(d*x + c)^2 - (a^11*b^3 + 3*a^9*b^5 + 3*a^7*b^7 + a^5*b^ 9)*d - ((a^14 - 6*a^10*b^4 - 8*a^8*b^6 - 3*a^6*b^8)*d*cos(d*x + c)^3 + 3*( a^12*b^2 + 3*a^10*b^4 + 3*a^8*b^6 + a^6*b^8)*d*cos(d*x + c))*sin(d*x + c))
\[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\int \frac {\csc ^{2}{\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right )^{4}}\, dx \]
Time = 0.39 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.21 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {\frac {12 \, b^{3} \tan \left (d x + c\right )^{3} + 30 \, a b^{2} \tan \left (d x + c\right )^{2} + 22 \, a^{2} b \tan \left (d x + c\right ) + 3 \, a^{3}}{a^{4} b^{3} \tan \left (d x + c\right )^{4} + 3 \, a^{5} b^{2} \tan \left (d x + c\right )^{3} + 3 \, a^{6} b \tan \left (d x + c\right )^{2} + a^{7} \tan \left (d x + c\right )} - \frac {12 \, b \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{5}} + \frac {12 \, b \log \left (\tan \left (d x + c\right )\right )}{a^{5}}}{3 \, d} \]
-1/3*((12*b^3*tan(d*x + c)^3 + 30*a*b^2*tan(d*x + c)^2 + 22*a^2*b*tan(d*x + c) + 3*a^3)/(a^4*b^3*tan(d*x + c)^4 + 3*a^5*b^2*tan(d*x + c)^3 + 3*a^6*b *tan(d*x + c)^2 + a^7*tan(d*x + c)) - 12*b*log(b*tan(d*x + c) + a)/a^5 + 1 2*b*log(tan(d*x + c))/a^5)/d
Time = 0.67 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.11 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\frac {\frac {12 \, b \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{5}} - \frac {12 \, b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a^{5}} + \frac {3 \, {\left (4 \, b \tan \left (d x + c\right ) - a\right )}}{a^{5} \tan \left (d x + c\right )} - \frac {22 \, b^{4} \tan \left (d x + c\right )^{3} + 75 \, a b^{3} \tan \left (d x + c\right )^{2} + 87 \, a^{2} b^{2} \tan \left (d x + c\right ) + 35 \, a^{3} b}{{\left (b \tan \left (d x + c\right ) + a\right )}^{3} a^{5}}}{3 \, d} \]
1/3*(12*b*log(abs(b*tan(d*x + c) + a))/a^5 - 12*b*log(abs(tan(d*x + c)))/a ^5 + 3*(4*b*tan(d*x + c) - a)/(a^5*tan(d*x + c)) - (22*b^4*tan(d*x + c)^3 + 75*a*b^3*tan(d*x + c)^2 + 87*a^2*b^2*tan(d*x + c) + 35*a^3*b)/((b*tan(d* x + c) + a)^3*a^5))/d
Time = 5.32 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.13 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\frac {8\,b\,\mathrm {atanh}\left (\frac {2\,b\,\mathrm {tan}\left (c+d\,x\right )}{a}+1\right )}{a^5\,d}-\frac {\frac {1}{a}+\frac {10\,b^2\,{\mathrm {tan}\left (c+d\,x\right )}^2}{a^3}+\frac {4\,b^3\,{\mathrm {tan}\left (c+d\,x\right )}^3}{a^4}+\frac {22\,b\,\mathrm {tan}\left (c+d\,x\right )}{3\,a^2}}{d\,\left (a^3\,\mathrm {tan}\left (c+d\,x\right )+3\,a^2\,b\,{\mathrm {tan}\left (c+d\,x\right )}^2+3\,a\,b^2\,{\mathrm {tan}\left (c+d\,x\right )}^3+b^3\,{\mathrm {tan}\left (c+d\,x\right )}^4\right )} \]